home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / asmutil / as05_103.zip / TESTCASE.A05 < prev   
Text File  |  1994-05-10  |  15KB  |  525 lines

  1.  
  2.                 org     $f000
  3.  
  4. AddrLow         equ     1
  5. AddrHigh        equ     $0203
  6.  
  7. * ───── implied-operand instructions ────────────────────────────────────
  8.  
  9. Start           clc
  10.                 cli
  11.                 mul
  12.                 nop
  13.                 rsp
  14.                 rti
  15.                 rts
  16.                 sec
  17.                 sei
  18.                 stop
  19.                 swi
  20.                 tax
  21.                 txa
  22.                 wait
  23.  
  24. * ───── one-operand instructions ────────────────────────────────────────
  25.  
  26.                 asl     AddrLow                 ; lsl is alternate mnemonic
  27.                 asl     10,x
  28.                 asl     ,x
  29.                 asla
  30.                 aslx
  31.  
  32.                 asr     AddrLow
  33.                 asr     10,x
  34.                 asr     ,x
  35.                 asra
  36.                 asrx
  37.                 
  38.                 clr     AddrLow
  39.                 clr     10,x
  40.                 clr     ,x
  41.                 clra
  42.                 clrx
  43.                 
  44.                 com     AddrLow
  45.                 com     10,x
  46.                 com     ,x
  47.                 coma
  48.                 comx
  49.                 
  50.                 dec     AddrLow
  51.                 dec     10,x
  52.                 dec     ,x
  53.                 deca
  54.                 decx
  55.                 
  56.                 inc     AddrLow
  57.                 inc     10,x
  58.                 inc     ,x
  59.                 inca
  60.                 incx
  61.                 
  62.                 lsr     AddrLow
  63.                 lsr     10,x
  64.                 lsr     ,x
  65.                 lsra
  66.                 lsrx
  67.                 
  68.                 neg     AddrLow
  69.                 neg     10,x
  70.                 neg     ,x
  71.                 nega
  72.                 negx
  73.                 
  74.                 rol     AddrLow
  75.                 rol     10,x
  76.                 rol     ,x
  77.                 rola
  78.                 rolx
  79.                 
  80.                 ror     AddrLow
  81.                 ror     10,x
  82.                 ror     ,x
  83.                 rora
  84.                 rorx
  85.  
  86.                 tst     AddrLow
  87.                 tst     10,x
  88.                 tst     ,x
  89.                 tsta
  90.                 tstx
  91.  
  92. * ───── two-operand instructions ────────────────────────────────────────
  93.  
  94.                 adc     #123
  95.                 adc     AddrLow
  96.                 adc     AddrHigh
  97.                 adc     -10,x
  98.                 adc     10,x
  99.                 adc     ,x
  100.  
  101.                 add     #123
  102.                 add     AddrLow
  103.                 add     AddrHigh
  104.                 add     -10,x
  105.                 add     10,x
  106.                 add     ,x
  107.  
  108.                 and     #123
  109.                 and     AddrLow
  110.                 and     AddrHigh
  111.                 and     -10,x
  112.                 and     10,x
  113.                 and     ,x
  114.  
  115.                 bit     #123
  116.                 bit     AddrLow
  117.                 bit     AddrHigh
  118.                 bit     -10,x
  119.                 bit     10,x
  120.                 bit     ,x
  121.  
  122.                 cmp     #123
  123.                 cmp     AddrLow
  124.                 cmp     AddrHigh
  125.                 cmp     -10,x
  126.                 cmp     10,x
  127.                 cmp     ,x
  128.  
  129.                 cmpx    #123                    ; cpx is alternate spelling for cmpx
  130.                 cmpx    AddrLow
  131.                 cmpx    AddrHigh
  132.                 cmpx    -10,x
  133.                 cmpx    10,x
  134.                 cmpx    ,x
  135.  
  136.                 eor     #123
  137.                 eor     AddrLow
  138.                 eor     AddrHigh
  139.                 eor     -10,x
  140.                 eor     10,x
  141.                 eor     ,x
  142.  
  143.                 lda     #123
  144.                 lda     AddrLow
  145.                 lda     AddrHigh
  146.                 lda     -10,x
  147.                 lda     10,x
  148.                 lda     ,x
  149.  
  150.                 ldx     #123
  151.                 ldx     AddrLow
  152.                 ldx     AddrHigh
  153.                 ldx     -10,x
  154.                 ldx     10,x
  155.                 ldx     ,x
  156.  
  157.                 ora     #123
  158.                 ora     AddrLow
  159.                 ora     AddrHigh
  160.                 ora     -10,x
  161.                 ora     10,x
  162.                 ora     ,x
  163.                 
  164.                 sbc     #123
  165.                 sbc     AddrLow
  166.                 sbc     AddrHigh
  167.                 sbc     -10,x
  168.                 sbc     10,x
  169.                 sbc     ,x
  170.                 
  171. *               sta     #123
  172.                 sta     AddrLow
  173.                 sta     AddrHigh
  174.                 sta     -10,x
  175.                 sta     10,x
  176.                 sta     ,x
  177.  
  178. *               stx     #123
  179.                 stx     AddrLow
  180.                 stx     AddrHigh
  181.                 stx     -10,x
  182.                 stx     10,x
  183.                 stx     ,x
  184.  
  185.                 sub     #123
  186.                 sub     AddrLow
  187.                 sub     AddrHigh
  188.                 sub     -10,x
  189.                 sub     10,x
  190.                 sub     ,x
  191.  
  192. * ───── branch and jump instructions ────────────────────────────────────
  193.  
  194. NearBranch      bcc     NearBranch
  195.                 bcs     NearBranch
  196.                 beq     NearBranch
  197.                 bhcc    NearBranch
  198.                 bhcs    NearBranch
  199.                 bhi     NearBranch
  200.                 bhs     NearBranch
  201.                 bih     NearBranch
  202.                 bil     NearBranch
  203.                 blo     NearBranch
  204.                 bls     NearBranch
  205.                 bmc     NearBranch
  206.                 bmi     NearBranch
  207.                 bms     NearBranch
  208.                 bne     NearBranch
  209.                 bpl     NearBranch
  210.                 bra     NearBranch
  211.                 brn     NearBranch
  212.                 bsr     NearBranch
  213.  
  214. *               jmp     #123
  215.                 jmp     AddrLow
  216.                 jmp     AddrHigh
  217.                 jmp     -10,x
  218.                 jmp     10,x
  219.                 jmp     ,x
  220.  
  221. *               jsr     #123
  222.                 jsr     AddrLow
  223.                 jsr     AddrHigh
  224.                 jsr     -10,x
  225.                 jsr     10,x
  226.                 jsr     ,x
  227.  
  228. * ───── bit instructions ────────────────────────────────────────────────
  229.  
  230.                 bclr    #0,AddrLow
  231.                 bclr    0,AddrLow
  232.                 bclr    #1,AddrLow
  233.                 bclr    1,AddrLow
  234.                 bclr    #2,AddrLow
  235.                 bclr    2,AddrLow
  236.                 bclr    #3,AddrLow
  237.                 bclr    3,AddrLow
  238.                 bclr    #4,AddrLow
  239.                 bclr    4,AddrLow
  240.                 bclr    #5,AddrLow
  241.                 bclr    #6,AddrLow
  242.                 bclr    #7,AddrLow
  243.  
  244.                 bset    #0,AddrLow
  245.                 bset    0,AddrLow
  246.                 bset    #1,AddrLow
  247.                 bset    #2,AddrLow
  248.                 bset    #3,AddrLow
  249.                 bset    #4,AddrLow
  250.                 bset    #5,AddrLow
  251.                 bset    #6,AddrLow
  252.                 bset    #7,AddrLow
  253.  
  254. NearBrClr       brclr   #0,AddrLow,NearBrClr
  255.                 brclr   #1,AddrLow,NearBrClr
  256.                 brclr   #2,AddrLow,NearBrClr
  257.                 brclr   2,AddrLow,NearBrClr
  258.                 brclr   #3,AddrLow,NearBrClr
  259.                 brclr   #4,AddrLow,NearBrClr
  260.                 brclr   #5,AddrLow,NearBrClr
  261.                 brclr   #6,AddrLow,NearBrClr
  262.                 brclr   #7,AddrLow,NearBrClr
  263.  
  264. NearBrSet       brset   #0,AddrLow,NearBrSet
  265.                 brset   #1,AddrLow,NearBrSet
  266.                 brset   #2,AddrLow,NearBrSet
  267.                 brset   #3,AddrLow,NearBrSet
  268.                 brset   #4,AddrLow,NearBrSet
  269.                 brset   #5,AddrLow,NearBrSet
  270.                 brset   #6,AddrLow,NearBrSet
  271.                 brset   #7,AddrLow,NearBrSet
  272.                 brset   7,AddrLow,NearBrSet
  273.  
  274. * ───── pseudo-instrutions ──────────────────────────────────────────────
  275.  
  276. DONKEY          equ     10
  277.                 fcb     1,2,3
  278.                 fcc     "friebs"
  279.                 fcc     "friebs"
  280.                 fdb     12345
  281.  
  282.                 db      -1,-1,-1,-1,-1,-1,-1,-1,-1,-1
  283.                 db      -1,-1,-1,-1,-1,-1